@@ -1,6 +1,6 @@ |
||
1 | 1 |
module JsonPathOptionsOverwritable |
2 | 2 |
extend ActiveSupport::Concern |
3 |
- # Using this concern allows providing optionional `<attribute>_path` options hash |
|
3 |
+ # Using this concern allows providing optional `<attribute>_path` options hash |
|
4 | 4 |
# attributes which will then (if not blank) be interpolated using the provided JSONPath. |
5 | 5 |
# |
6 | 6 |
# Example options Hash: |
@@ -14,9 +14,9 @@ module JsonPathOptionsOverwritable |
||
14 | 14 |
# { |
15 | 15 |
# name: 'dynamic huginn' |
16 | 16 |
# } |
17 |
- # calling agent.merge_json_path_options(event) returns the fowolling hash: |
|
17 |
+ # calling agent.merge_json_path_options(event) returns the following hash: |
|
18 | 18 |
# { |
19 |
- # name: 'dynamic huggin' |
|
19 |
+ # name: 'dynamic huginn' |
|
20 | 20 |
# title: 'Hello from Huginn' |
21 | 21 |
# } |
22 | 22 |
|
@@ -46,7 +46,7 @@ module Agents |
||
46 | 46 |
def receive(incoming_events) |
47 | 47 |
incoming_events.each do |event| |
48 | 48 |
response = HTTParty.post "https://api.pushbullet.com/api/pushes", query_options(event) |
49 |
- log(response.body) if response.body.include? 'error' |
|
49 |
+ error(response.body) if response.body.include? 'error' |
|
50 | 50 |
end |
51 | 51 |
end |
52 | 52 |
|
@@ -57,7 +57,7 @@ describe Agents::PushbulletAgent do |
||
57 | 57 |
stub_request(:post, "https://token:@api.pushbullet.com/api/pushes"). |
58 | 58 |
with(:body => "device_iden=124&type=note&title=hello%20from%20huginn&body=One%20two%20test"). |
59 | 59 |
to_return(:status => 200, :body => "ok", :headers => {}) |
60 |
- dont_allow(@checker).log |
|
60 |
+ dont_allow(@checker).error |
|
61 | 61 |
@checker.receive([@event]) |
62 | 62 |
end |
63 | 63 |
|
@@ -65,7 +65,7 @@ describe Agents::PushbulletAgent do |
||
65 | 65 |
stub_request(:post, "https://token:@api.pushbullet.com/api/pushes"). |
66 | 66 |
with(:body => "device_iden=124&type=note&title=hello%20from%20huginn&body=One%20two%20test"). |
67 | 67 |
to_return(:status => 200, :body => "error", :headers => {}) |
68 |
- mock(@checker).log("error") |
|
68 |
+ mock(@checker).error("error") |
|
69 | 69 |
@checker.receive([@event]) |
70 | 70 |
end |
71 | 71 |
end |